/// 噪点文字；
/// @example 使用方法
/// strong{@include hotPixel_text(30px, #fff);}
@mixin hotPixel_text($fontSize, $color: #0000) {
  font-size: $fontSize;
  color: $color;
  background: repeating-radial-gradient(#000 0 0.0001%, #fff 0 0.0002%) 50% 0 /
      2500px 2500px,
    repeating-conic-gradient(#000 0 0.0001%, #fff 0 0.0002%) 50% 50% / 2500px
      2500px;
  background-blend-mode: difference;
  mix-blend-mode: lighten;
  background-clip: text;
}

/// 噪点图片；
/// @example 使用方法:
/// @include hotPixel_img();
@mixin hotPixel_img() {
  figure {
    display: inline-flex;
    position: relative;
    filter: sepia(100%);
    &::before {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(#000a, #000a),
        repeating-radial-gradient(#000 0 0.0001%, #fff 0 0.0002%) 50% 0 / 2500px
          2500px,
        repeating-conic-gradient(#000 0 0.0001%, #fff 0 0.0002%) 60% 60% /
          2500px 2500px;
      background-blend-mode: normal, difference;
      mix-blend-mode: overlay;
      opacity: 0.6;
    }
  }
}
